<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="80px">
      <el-form-item label="批次号" prop="batchNo">
        <el-input
          v-model="queryParams.batchNo"
          placeholder="请输入批次号"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="产品分类" prop="productCategory">
        <el-select v-model="queryParams.productCategory" placeholder="请选择产品分类" clearable size="small">
          <el-option
            v-for="dict in configCategoryOptions"
            :key="dict.categoryCode"
            :label="dict.categoryName"
            :value="dict.categoryCode"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="产品SKU" prop="itemSku">
        <el-input
          v-model="queryParams.itemSku"
          placeholder="请输入产品SKU"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="父子关系" prop="parentChild">
        <el-select v-model="queryParams.parentChild" placeholder="请选择父子关系" clearable size="small" style="width: 100px;">
          <el-option
            v-for="dict in parentChildOptions"
            :key="dict.dictValue"
            :label="dict.dictLabel"
            :value="dict.dictValue"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="创建人" prop="createBy">
        <el-input
          v-model="queryParams.createBy"
          placeholder="请输入创建人"
          clearable
          size="small"
          style="width: 100px;"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>

      <el-form-item>
        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['amz:productTempExport:add']"
        >新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['amz:productTempExport:edit']"
        >修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['amz:productTempExport:remove']"
        >删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['amz:productTempExport:export']"
        >导出</el-button>
      </el-col>
	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <el-table v-loading="loading" :data="productTempExportList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="批次号" align="center" prop="batchNo" />
      <el-table-column label="产品代码" align="center" prop="productCode" />
      <el-table-column label="产品分类" align="center" prop="productCategory" :formatter="productCategoryFormat" />
      <el-table-column label="品牌" align="center" prop="brandName" show-overflow-tooltip />
      <el-table-column label="产品SKU" align="center" prop="itemSku" />
      <el-table-column label="产品父SKU" align="center" prop="parentSku" />
      <el-table-column label="主图" align="center" prop="mainImageUrl" :formatter="mainImageUrlFormat" show-overflow-tooltip />
      <el-table-column label="标准售价" align="center" prop="standardPrice" />
      <el-table-column label="产品名称" align="center" prop="itemName" show-overflow-tooltip />
      <el-table-column label="创建时间" align="center" prop="createTime" show-overflow-tooltip />
      <el-table-column label="备注" align="center" prop="remark" />
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['amz:productTempExport:edit']"
          >修改</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['amz:productTempExport:remove']"
          >删除</el-button>
        </template>
      </el-table-column>
    </el-table>

    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

    <!-- 添加或修改产品导出记录对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="60%" :close-on-click-modal="false" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
        <el-form-item label="主键自增" prop="id">
          <el-input v-model="form.id" placeholder="请输入主键自增" />
        </el-form-item>
        <el-form-item label="批次号" prop="batchNo">
          <el-input v-model="form.batchNo" placeholder="请输入批次号" />
        </el-form-item>
        <el-form-item label="产品分类" prop="productCategory">
          <el-select v-model="form.productCategory" placeholder="请选择产品分类">
            <el-option
              v-for="dict in configCategoryOptions"
              :key="dict.categoryCode"
              :label="dict.categoryName"
              :value="dict.categoryCode"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="品牌" prop="brandName">
          <el-input v-model="form.brandName" placeholder="请输入品牌" />
        </el-form-item>
        <el-form-item label="制造商" prop="manufacturer">
          <el-input v-model="form.manufacturer" placeholder="请输入制造商" />
        </el-form-item>
        <el-form-item label="更新删除" prop="updateDelete">
          <el-select v-model="form.updateDelete" placeholder="请选择更新删除">
            <el-option
              v-for="dict in updateDeleteOptions"
              :key="dict.dictValue"
              :label="dict.dictLabel"
              :value="dict.dictValue"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="条件类型" prop="conditionType">
          <el-select v-model="form.conditionType" placeholder="请选择条件类型">
            <el-option
              v-for="dict in conditionTypeOptions"
              :key="dict.dictValue"
              :label="dict.dictLabel"
              :value="dict.dictValue"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="原产国/地区" prop="countryOfOrigin">
          <el-select v-model="form.countryOfOrigin" placeholder="请选择原产国/地区">
            <el-option
              v-for="dict in countryOfOriginOptions"
              :key="dict.dictValue"
              :label="dict.dictLabel"
              :value="dict.dictValue"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="订单最大数量" prop="maxOrderQuantity">
          <el-input v-model="form.maxOrderQuantity" placeholder="请输入订单最大数量" />
        </el-form-item>
        <el-form-item label="包裹包含数量" prop="packageContainsQuantity">
          <el-input v-model="form.packageContainsQuantity" placeholder="请输入包裹包含数量" />
        </el-form-item>
        <el-form-item label="运营中心编号" prop="fulfillmentCenterId">
          <el-input v-model="form.fulfillmentCenterId" placeholder="请输入运营中心编号" />
        </el-form-item>
        <el-form-item label="产品SKU" prop="itemSku">
          <el-input v-model="form.itemSku" placeholder="请输入产品SKU" />
        </el-form-item>
        <el-form-item label="产品父SKU" prop="parentSku">
          <el-input v-model="form.parentSku" placeholder="请输入产品父SKU" />
        </el-form-item>
        <el-form-item label="产品编码" prop="externalProductId">
          <el-input v-model="form.externalProductId" placeholder="请输入产品编码" />
        </el-form-item>
        <el-form-item label="产品编码类型" prop="externalProductIdType">
          <el-select v-model="form.externalProductIdType" placeholder="请选择产品编码类型">
            <el-option
              v-for="dict in externalProductIdTypeOptions"
              :key="dict.dictValue"
              :label="dict.dictLabel"
              :value="dict.dictValue"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="父子关系" prop="parentChild">
          <el-select v-model="form.parentChild" placeholder="请选择父子关系">
            <el-option
              v-for="dict in parentChildOptions"
              :key="dict.dictValue"
              :label="dict.dictLabel"
              :value="dict.dictValue"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="关系类型" prop="relationshipType">
          <el-input v-model="form.relationshipType" placeholder="请输入关系类型" />
        </el-form-item>
        <el-form-item label="变体主题" prop="variationTheme">
          <el-select v-model="form.variationTheme" placeholder="请选择变体主题">
            <el-option
              v-for="dict in variationThemeOptions"
              :key="dict.dictValue"
              :label="dict.dictLabel"
              :value="dict.dictValue"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="颜色" prop="colorName">
          <el-input v-model="form.colorName" placeholder="请输入颜色" />
        </el-form-item>
        <el-form-item label="尺寸" prop="sizeName">
          <el-input v-model="form.sizeName" placeholder="请输入尺寸" />
        </el-form-item>
        <el-form-item label="产品重量" prop="itemWeight">
          <el-input v-model="form.itemWeight" placeholder="请输入产品重量" />
        </el-form-item>
        <el-form-item label="产品重量计量单位" prop="itemWeightUnitOfMeasure">
          <el-input v-model="form.itemWeightUnitOfMeasure" placeholder="请输入产品重量计量单位" />
        </el-form-item>
        <el-form-item label="库存数量" prop="quantity">
          <el-input v-model="form.quantity" placeholder="请输入库存数量" />
        </el-form-item>
        <el-form-item label="优惠价" prop="salePrice">
          <el-input v-model="form.salePrice" placeholder="请输入优惠价" />
        </el-form-item>
        <el-form-item label="优惠价开始日期" prop="saleFromDate">
          <el-date-picker clearable size="small" style="width: 200px"
            v-model="form.saleFromDate"
            type="date"
            value-format="yyyy-MM-dd HH:mm:ss"
            placeholder="选择优惠价开始日期yyyy-MM-dd">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="优惠价结束日期" prop="saleEndDate">
          <el-date-picker clearable size="small" style="width: 200px"
            v-model="form.saleEndDate"
            type="date"
            value-format="yyyy-MM-dd HH:mm:ss"
            placeholder="选择优惠价结束日期yyyy-MM-dd">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="主图" prop="mainImageUrl">
          <el-input v-model="form.mainImageUrl" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="其他图片1" prop="otherImageUrl1">
          <el-input v-model="form.otherImageUrl1" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="其他图片2" prop="otherImageUrl2">
          <el-input v-model="form.otherImageUrl2" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="其他图片3" prop="otherImageUrl3">
          <el-input v-model="form.otherImageUrl3" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="其他图片4" prop="otherImageUrl4">
          <el-input v-model="form.otherImageUrl4" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="其他图片5" prop="otherImageUrl5">
          <el-input v-model="form.otherImageUrl5" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="其他图片6" prop="otherImageUrl6">
          <el-input v-model="form.otherImageUrl6" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="其他图片7" prop="otherImageUrl7">
          <el-input v-model="form.otherImageUrl7" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="其他图片8" prop="otherImageUrl8">
          <el-input v-model="form.otherImageUrl8" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="标准售价" prop="standardPrice">
          <el-input v-model="form.standardPrice" placeholder="请输入标准售价" />
        </el-form-item>
        <el-form-item label="产品名称" prop="itemName">
          <el-input v-model="form.itemName" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="搜索关键词" prop="genericKeywords">
          <el-input v-model="form.genericKeywords" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="产品特性1" prop="bulletPoint1">
          <el-input v-model="form.bulletPoint1" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="产品特性2" prop="bulletPoint2">
          <el-input v-model="form.bulletPoint2" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="产品特性3" prop="bulletPoint3">
          <el-input v-model="form.bulletPoint3" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="产品特性4" prop="bulletPoint4">
          <el-input v-model="form.bulletPoint4" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="产品特性5" prop="bulletPoint5">
          <el-input v-model="form.bulletPoint5" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="产品描述" prop="productDescription">
          <el-input v-model="form.productDescription" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="属性0" prop="attr0">
          <el-input v-model="form.attr0" placeholder="请输入属性0" />
        </el-form-item>
        <el-form-item label="属性1" prop="attr1">
          <el-input v-model="form.attr1" placeholder="请输入属性1" />
        </el-form-item>
        <el-form-item label="属性2" prop="attr2">
          <el-input v-model="form.attr2" placeholder="请输入属性2" />
        </el-form-item>
        <el-form-item label="属性3" prop="attr3">
          <el-input v-model="form.attr3" placeholder="请输入属性3" />
        </el-form-item>
        <el-form-item label="属性4" prop="attr4">
          <el-input v-model="form.attr4" placeholder="请输入属性4" />
        </el-form-item>
        <el-form-item label="属性5" prop="attr5">
          <el-input v-model="form.attr5" placeholder="请输入属性5" />
        </el-form-item>
        <el-form-item label="属性6" prop="attr6">
          <el-input v-model="form.attr6" placeholder="请输入属性6" />
        </el-form-item>
        <el-form-item label="属性7" prop="attr7">
          <el-input v-model="form.attr7" placeholder="请输入属性7" />
        </el-form-item>
        <el-form-item label="属性8" prop="attr8">
          <el-input v-model="form.attr8" placeholder="请输入属性8" />
        </el-form-item>
        <el-form-item label="属性9" prop="attr9">
          <el-input v-model="form.attr9" placeholder="请输入属性9" />
        </el-form-item>
        <el-form-item label="属性10" prop="attr10">
          <el-input v-model="form.attr10" placeholder="请输入属性10" />
        </el-form-item>
        <el-form-item label="属性11" prop="attr11">
          <el-input v-model="form.attr11" placeholder="请输入属性11" />
        </el-form-item>
        <el-form-item label="属性12" prop="attr12">
          <el-input v-model="form.attr12" placeholder="请输入属性12" />
        </el-form-item>
        <el-form-item label="属性13" prop="attr13">
          <el-input v-model="form.attr13" placeholder="请输入属性13" />
        </el-form-item>
        <el-form-item label="属性14" prop="attr14">
          <el-input v-model="form.attr14" placeholder="请输入属性14" />
        </el-form-item>
        <el-form-item label="属性15" prop="attr15">
          <el-input v-model="form.attr15" placeholder="请输入属性15" />
        </el-form-item>
        <el-form-item label="备注" prop="remark">
          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>


    </el-dialog>
  </div>
</template>

<script>
import { listProductTempExport, getProductTempExport, delProductTempExport, addProductTempExport, updateProductTempExport, exportProductTempExport } from "@/api/amz/productTempExport";
import { getConfigCategoryByDept } from "@/api/amz/configCategory";

export default {
  name: "ProductTempExport",
  components: {
  },
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 产品导出记录表格数据
      productTempExportList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,

      // 产品类别列表-部门
      configCategoryOptions: [],
      // 更新删除字典
      updateDeleteOptions: [],
      // 条件类型字典
      conditionTypeOptions: [],
      // 原产国/地区字典
      countryOfOriginOptions: [],
      // 产品编码类型字典
      externalProductIdTypeOptions: [],
      // 父子关系字典
      parentChildOptions: [],
      // 变体主题字典
      variationThemeOptions: [],

      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        id: [
          { required: true, message: "主键自增不能为空", trigger: "blur" }
        ],
      }
    };
  },
  created() {
    this.getList();
    /* 获取类目配置-部门*/
    this.getConfigCategoryByDept();

    this.getDicts("amz_update_delete").then(response => {
      this.updateDeleteOptions = response.data;
    });
    this.getDicts("amz_condition_type").then(response => {
      this.conditionTypeOptions = response.data;
    });
    this.getDicts("amz_country_of_origin").then(response => {
      this.countryOfOriginOptions = response.data;
    });
    this.getDicts("amz_external_product_id_type").then(response => {
      this.externalProductIdTypeOptions = response.data;
    });
    this.getDicts("amz_parent_child").then(response => {
      this.parentChildOptions = response.data;
    });
    this.getDicts("amz_variation_theme").then(response => {
      this.variationThemeOptions = response.data;
    });

  },
  methods: {
    /** 查询产品导出记录列表 */
    getList() {
      this.loading = true;
      listProductTempExport(this.queryParams).then(response => {
        this.productTempExportList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    /* 获取类目配置-部门*/
    getConfigCategoryByDept(){
      getConfigCategoryByDept().then(response => {
        this.configCategoryOptions = response.data;
      });
    },

    // 产品分类字典翻译
    productCategoryFormat(row, column) {
      var categoryName = "";
      this.configCategoryOptions.forEach(obj =>{
        if (obj.categoryCode===row.productCategory){
          categoryName = obj.categoryName;
        }
      });
      return categoryName;
    },
    // 产品主图
    mainImageUrlFormat(row, column) {

      let mainImageUrl = row.mainImageUrl;
      var mainImageUrlHtml =
                              '        <img \n' +
                              '          style="width: 100px; height: 100px"\n' +
                              '          src="https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg" \n' +
                              /*'          :preview-src-list="srcList">\n' +*/
                              '        />\n' ;
      return mainImageUrlHtml;
    },
    // 更新删除字典翻译
    updateDeleteFormat(row, column) {
      return this.selectDictLabel(this.updateDeleteOptions, row.updateDelete);
    },
    // 条件类型字典翻译
    conditionTypeFormat(row, column) {
      return this.selectDictLabel(this.conditionTypeOptions, row.conditionType);
    },
    // 原产国/地区字典翻译
    countryOfOriginFormat(row, column) {
      return this.selectDictLabel(this.countryOfOriginOptions, row.countryOfOrigin);
    },
    // 产品编码类型字典翻译
    externalProductIdTypeFormat(row, column) {
      return this.selectDictLabel(this.externalProductIdTypeOptions, row.externalProductIdType);
    },
    // 父子关系字典翻译
    parentChildFormat(row, column) {
      return this.selectDictLabel(this.parentChildOptions, row.parentChild);
    },
    // 变体主题字典翻译
    variationThemeFormat(row, column) {
      return this.selectDictLabel(this.variationThemeOptions, row.variationTheme);
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        batchNo: null,
        productCategory: null,
        brandName: null,
        manufacturer: null,
        updateDelete: null,
        conditionType: null,
        countryOfOrigin: null,
        maxOrderQuantity: null,
        packageContainsQuantity: null,
        fulfillmentCenterId: null,
        itemSku: null,
        parentSku: null,
        externalProductId: null,
        externalProductIdType: null,
        parentChild: null,
        relationshipType: null,
        variationTheme: null,
        colorName: null,
        sizeName: null,
        itemWeight: null,
        itemWeightUnitOfMeasure: null,
        quantity: null,
        salePrice: null,
        saleFromDate: null,
        saleEndDate: null,
        mainImageUrl: null,
        otherImageUrl1: null,
        otherImageUrl2: null,
        otherImageUrl3: null,
        otherImageUrl4: null,
        otherImageUrl5: null,
        otherImageUrl6: null,
        otherImageUrl7: null,
        otherImageUrl8: null,
        standardPrice: null,
        itemName: null,
        genericKeywords: null,
        bulletPoint1: null,
        bulletPoint2: null,
        bulletPoint3: null,
        bulletPoint4: null,
        bulletPoint5: null,
        productDescription: null,
        attr0: null,
        attr1: null,
        attr2: null,
        attr3: null,
        attr4: null,
        attr5: null,
        attr6: null,
        attr7: null,
        attr8: null,
        attr9: null,
        attr10: null,
        attr11: null,
        attr12: null,
        attr13: null,
        attr14: null,
        attr15: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null,
        remark: null
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加产品导出记录";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids
      getProductTempExport(id).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = "修改产品导出记录";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.id != null) {
            updateProductTempExport(this.form).then(response => {
              this.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addProductTempExport(this.form).then(response => {
              this.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$confirm('是否确认删除产品导出记录编号为"' + ids + '"的数据项?', "警告", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(function() {
          return delProductTempExport(ids);
        }).then(() => {
          this.getList();
          this.msgSuccess("删除成功");
        })
    },
    /** 导出按钮操作 */
    handleExport() {
      const queryParams = this.queryParams;
      this.$confirm('是否确认导出所有产品导出记录数据项?', "警告", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(function() {
          return exportProductTempExport(queryParams);
        }).then(response => {
          this.download(response.msg);
        })
    }
  }
};
</script>
